package com.team.runsfast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.team.runsfast.type.UserLevelType;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@TableName("t_userlevel")
@NoArgsConstructor
public class UserLevel {
    /**序号*/
    @TableId(type = IdType.AUTO)
    private Long id;
    /**用户ID*/
    private Long uid;
    /**等级*/
    private Integer level;
    /**经验 等价于 积分 1积分=1经验*/
    private Long expire;
    /**积分*/
    private Long score;
    /**相关信息*/
    private String levelmsg;
    /**信息内容*/
    private String info;

    public UserLevel(Long uid, Long expire, String info) {
        this.uid = uid;
        this.expire = expire;
        this.score=expire;
        this.info = info;
        this.level= UserLevelType.黑铁.getVal();
        this.levelmsg="黑铁";
    }
}